package JD;

import java.util.Scanner;

public abstract class Shopping {
	//分析  固定的功能  1.浏览商品 2.客户咨询 3. 配送服务 4.查看订单
	// 可变功能：1.选择商品 2.结算 3.支付
	public void browseGoods(){
		System.out.println("1.浏览商品");
	}
	
	public abstract void selectGoods();
	
	public void callService(){
		
		System.out.println("是否需要客户服务？要  不要");
		Scanner s =new Scanner(System.in);
		String str = s.next();
	}
	
	public abstract void computerPrice();
	
	public abstract void orderPay();
	
	public void sendService(){
		System.out.println("6.京东配送");
	}
	
	public void showOrder(){
		System.out.println("7.查看订单");
	}
	public final void process(){
		browseGoods();
		selectGoods();
		callService();
		computerPrice();
		orderPay();
		sendService();
		showOrder();
	}
			
}

class customer extends Shopping{

	@Override
	public void selectGoods() {
		System.out.println("2.选择商品");
		
	}

	@Override
	public void computerPrice() {
		System.out.println("4.结算");
		
	}

	@Override
	public void orderPay() {
		System.out.println("5.微信支付");
		
	}
	
}
